Namespacing everything to /UVa.
[andmenj-acm.git] / UVa / 369 - Combinations / 369.cpp
blob0f0f4d2e0c40e6f3de13d397050625df94315936
1 #include <iostream>
3 using namespace std;
5 unsigned long long dp[101][101];
8 int main(){
9 for (int i=0; i<=100; ++i){
10 dp[i][0] = dp[i][i] = 1;
12 for (int i=1; i<=100; ++i)
13 for (int j=1; j<=100; ++j)
14 dp[i][j] = dp[i-1][j-1] + dp[i-1][j];
16 int n, m;
17 cin >> n >> m;
18 while (n + m){
19 cout << n << " things taken " << m << " at a time is " << dp[n][m] << " exactly.\n";
20 cin >> n >> m;
23 return 0;